#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#include <unistd.h>

int main() {
	int int1, int2;
	char line[4096];

	if (setvbuf(stdin, NULL,_IOLBF, 0) != 0) {
		printf("setvbuf error: %s\n", strerror(errno));
		return -1;
	}

	if (setvbuf(stdout, NULL,_IOLBF, 0) != 0) {
		printf("setvbuf error: %s\n", strerror(errno));
		return -1;
	}


	while (fgets(line, 4096, stdin) != NULL) {
		if (sscanf(line, "%d%d", &int1, &int2) == 2) {
			printf("%d\n", int1+int2);
			return -1;
		}
		else {
			if (printf("invalid args\n") == EOF) {
				printf("error printf: %s\n", strerror(errno));
				return -1;
			}
		}
	}

	return 0;
}